package m;

public class Person {
	String name;
	String sn;
	private String gender;

	public String getGender() {
		return gender;
	}

	public void setAsFemale() {
		this.gender = "female";
	}

	public void setAsMale() {
		this.gender = "male";
	}

	public Person(String name2, String sn2, String gender) {
		setName(name2);
		setSn(sn2);
		if (gender == "male") {
			setAsMale();
		} else if (gender == "female") {
			setAsFemale();
		} else {
			System.err.println("gender is wrong");
		}
	}

	public Person() {
		// TODO Auto-generated constructor stub
	}

	public String getName() {
		return name;
	}

	public String getSn() {
		return sn;
	}

	public void setName(String name) {
		this.name = name;
	}

	public void setSn(String sn) {
		this.sn = sn;
	}
}
